package com.foosun.core.entity;

import com.foosun.core.base.BaseEntity;
import com.foosun.core.util.JDBCName;

import java.util.Map;

/**
 * Created by Nelin on 14-5-30.
 */
@JDBCName("C_RESOURCE")
public class Resource extends BaseEntity {

    private String name; //资源名称
    private String url;//URL
    private String title;//提示语
    private String memo;//备注
    private Integer order;//序号

    private Integer groupId;//资源组

    private Boolean isMenu;//菜单项
    private Boolean enable;//禁用 值弄反了，请见谅
    private String icon;//图标

    private ResourceGroup group;

    @Override
    public Map<String, Object> getEntityMap() {
        Map<String, Object> map = super.getEntityMap();
        map.put("name", name);
        map.put("url", url);
        map.put("title", title);
        map.put("memo", memo);
        map.put("order", order);
        map.put("group_id", groupId);
        map.put("is_menu", isMenu);
        map.put("enable", enable);
        map.put("icon", icon);
        return map;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public Boolean getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(Boolean isMenu) {
        this.isMenu = isMenu;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public ResourceGroup getGroup() {
        return group;
    }

    public void setGroup(ResourceGroup group) {
        this.group = group;
    }
}
